{# **
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * #}
{% extends '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit_base.html.twig' %}

{% block catalog_price_rules_widget %}
  <div {{ block('widget_container_attributes') }}>
    <div id="catalog-price-rule-list-container" class="d-none">
      <div id="catalog-price-rules-loading">
        <div class="loading-label">{{ 'Loading catalog price rules'|trans({}, 'Admin.Catalog.Feature') }}</div>
        <div class="spinner spinner-primary"></div>
      </div>
      <table class="table" id="catalog-price-rules-list-table">
        <thead class="thead-default">
        <tr>
          <th>{{ 'ID'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Name'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Currency'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Country'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Group'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Store'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Discount'|trans({}, 'Admin.Catalog.Feature') }}</th>
          <th>{{ 'Units'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'From'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'To'|trans({}, 'Admin.Global') }}</th>
          <th></th>
        </tr>
        </thead>
        <tbody>
        {# template rows dynamically generated using javascript #}
        </tbody>
      </table>
      <div class="row justify-content-center" id="catalog-price-rules-pagination">
        {{ include('@PrestaShop/Admin/Common/javascript_pagination.html.twig', {
          limit: 10,
          limitChoices: [10, 20, 50, 100, 300, 1000],
        }) }}
      </div>
      <script type="text/html" id="catalog-price-rule-tr-template">
        <tr>
          <td class="catalog-price-rule-id"></td>
          <td class="name"></td>
          <td class="currency"></td>
          <td class="country"></td>
          <td class="group"></td>
          <td class="shop"></td>
          <td class="impact"></td>
          <td class="from-qty"></td>
          <td class="from"></td>
          <td class="to"></td>
          <td>
            <a
              href=""
              type="button"
              title="{{ 'Edit'|trans({}, 'Admin.Actions') }}"
              class="js-edit-catalog-price-rule-btn btn tooltip-link"><i class="material-icons">edit</i>
            </a>
          </td>
        </tr>
      </script>
    </div>
  </div>
{% endblock %}
